import request from '@/utils/request'

export function getChapters(courseId) {
  return request({
    url: '/course/chapter/list',
    method: 'post',
    data:{
        courseId:courseId
    }
  })

}

export function removeChapter(data) {
  return request({
    url: '/course/chapter/delete',
    method: 'delete',
    data:data
  })

}

export function saveChapter(data) {
  return request({
    url: '/course/chapter/save',
    method: 'post',
    data:data
  })

}

export function updateChapter(data) {
  return request({
      url: '/course/chapter/save',
      method: 'put',
      data:data
  })

}

export function bratchchapter(data) {
  return request({
      url: '/course/chapter/addBatch',
      method: 'post',
      data: data
  })
}